//获取时间
var my_date = new Date();
var year = my_date.getFullYear(); //年
var month = my_date.getMonth()+1; //月  ,因为从0开始，所以要加1，
var day = my_date.getDate();     //日 
var week = my_date.getDay();     //星期，从0代表星期天
var today = year+"/"+month+"/"+day; //今天日期（年月日）
var week_json = ["星期天","星期一","星期二","星期三","星期四","星期五","星期六"];

	//明天日期
			var tomorrow = function tomorrow(){
				var day3 = new Date();
		    	day3.setTime(day3.getTime()+24*60*60*1000);
		    	var s3 = day3.getFullYear()+"/" + (day3.getMonth()+1) + "/" + day3.getDate();
		    	return s3;
			}();	

	//天数差
			function daysBetween(Date1,Date2) { //Date1和Date2是2017-07-10格式  
    			var sDate, newDate1, newDate2, Days
    			aDate = Date1.split("-");
   				newDate1 = new Date(aDate[1] + '/' + aDate[2] + '/' + aDate[0]); //转换为07-10-2017格式  
   				aDate = Date2.split("-");
    			newDate2 = new Date(aDate[1] + '/' + aDate[2] + '/' + aDate[0]);
   				Days = parseInt(Math.abs(newDate1 - newDate2) / 1000 / 60 / 60 / 24); //把差的毫秒数转换为天数  
   				 return Days;
			}
			
	//日期转为星期
			function xq(day){
					var myDate = new Date(Date.parse(day.replace(/-/g, "/")));
				    /*console.log(week_json[myDate.getDay()]);*/
					return week_json[myDate.getDay()];
			}
	
	//获取指定日期的后一天
			function next_day(d){
			d = new Date(d);    
			d = +d + 1000*60*60*24;     
			d = new Date(d);      
			    return d.getFullYear()+"/"+(d.getMonth()+1)+"/"+d.getDate();               
			 }
			
	//获取指定日期的后多少天
	function next_days(d,day_num){
			d = new Date(d);    
			d = +d + 1000*60*60*24*day_num;     
			d = new Date(d);      
			    return d.getFullYear()+"/"+(d.getMonth()+1)+"/"+d.getDate();               
			 }


